package at.jku.se.fastsell.db4o.transactions;

import java.util.LinkedList;
import java.util.List;

import at.jku.se.fastsell.data.User;
import at.jku.se.fastsell.db4o.DatabaseException;

import com.db4o.ObjectSet;

public class GetAllUsersTransaction extends Transaction<List<User>> {
	
	@Override
	public List<User> run() throws DatabaseException {
		List<User> users = new LinkedList<User>();
		
		ObjectSet<User> result = db.queryByExample(User.class);
		users.addAll(result);
		
		return users;		
	}

}
